<template>
  <div>
    <!-- <div class="title">
      <el-row>
        <el-col :span="1" style="width: 50px;">
          <span style="color:#757575;">位置 :</span>
        </el-col>
        <el-col :span="20">
          <span @click="tableshow" class="hand" :class="{'textactive' : !secondshow}">工作记录(交付)</span>
          <span v-if="secondshow" :class="{'textactive' : secondshow}">> {{secondtitle}}</span>
        </el-col>
      </el-row>
    </div> -->
    <div class="posttable workrecord" v-show="!addShow">
      <div style="padding-top: 15px;">
        <el-row type="flex" justify="center" style="margin-bottom: 20px;">
          <el-col :span="23">
            <el-col style="width:320px;height: 880px;">
              <el-col style="width:320px;height: 360px;border: 2px solid #ececec;">
                <el-calendar v-model="data">
                  <template slot="dateCell" slot-scope="{date, data}">
                    <div style="width: 100%;height: 100%;">
                      <p>{{ data.day.split('-').slice(2).join('-') }}</p>
                    </div>
                  </template>
                </el-calendar>
              </el-col>
              <el-col style="width: 320px;" class="thirdbox1">
                <el-form ref="form" :model="form" :rules="rules">
                  <el-form-item prop="todaytask">
                    <el-input
                      :disabled="inputdis"
                      type="textarea"
                      :placeholder="taskinfo"
                      resize="none"
                      v-model="form.todaytask"
                    ></el-input>
                  </el-form-item>
                  <el-button
                    class="save"
                    :disabled="savedis"
                    @click="updatetodaywork('form')"
                    v-if="btndis"
                  >保存
                  </el-button>
                </el-form>
              </el-col>
            </el-col>
            
            <el-col class="listbox" style="margin-left:25px">
              <el-row style="margin-top: 11px;" class="btn">
                <div class="tabletitle" style="float: left;">
                  <el-radio v-model="radio" @change="radioChange" label="简历未反馈">简历未反馈</el-radio>
                  <el-radio v-model="radio" @change="radioChange" label="面试未反馈">面试未反馈</el-radio>
                  <el-radio v-model="radio" @change="radioChange" label="简历已反馈">简历已反馈</el-radio>
                </div>
                <div style="margin-bottom:20px;float: right;">
                  <el-input
                    style="width: 136px;"
                    size="small"
                    placeholder="请输入内容"
                    v-model.trim="inputValue"
                    @keyup.enter.native="searchMsg"
                  >
                    <i
                      slot="suffix"
                      class="el-input__icon el-icon-search"
                      style="cursor: pointer;"
                      @click="searchMsg"
                    ></i>
                  </el-input>
                  <el-button
                    style="background: linear-gradient(to bottom, #feaa12 0%, #f28316 100%);"
                    class="back"
                    v-if="radio =='简历未反馈'"
                    size="small"
                    round
                    @click="backClick"
                  >反馈
                  </el-button>
                  <el-button
                    style="margin-left: 5px;"
                    class="edit"
                    :class="{'active1' : newcolor1}"
                    size="small"
                    v-if="buttonshow"
                    @click="editClick"
                    round
                  >反馈
                  </el-button>
                  <el-button
                    v-if="radio =='面试未反馈'"
                    class="back"
                    size="small"
                    round
                    @click="unpassbackClick"
                  >未反馈
                  </el-button>
                  <el-button
                    v-if="radio =='简历已反馈'"
                    class="back"
                    size="small"
                    round
                    @click="alreadybackClick"
                  >修改
                  </el-button>
                </div>
              </el-row>
              
              <el-row type="flex" justify="center">
                <el-col>
                  <el-table
                    :key="Math.random()"
                    class="resutable"
                    :data="tableData"
                    highlight-current-row
                    @current-change="handleCurrentChange"
                    ref="multipleTable"
                  >
                    <el-table-column label="未反馈时间">
                      <template slot-scope="scope">
                        <span style="cursor: pointer; color:#757575;">{{scope.row.diffDay}}</span>
                      </template>
                    </el-table-column>
                    <el-table-column prop="type" v-if="radio =='面试未反馈'" label="面试次数"></el-table-column>
                    <el-table-column prop="name" label="姓名"></el-table-column>
                    <el-table-column prop="customerName" label="推送客户"></el-table-column>
                    <el-table-column prop="postName" label="推送职位"></el-table-column>
                    <el-table-column prop="postLevel" label="职位级别"></el-table-column>
                    <el-table-column v-if="radio =='简历未反馈' || radio =='简历已反馈'" width="160" label="到岗时间">
                      <template slot-scope="scope">
                        <span>{{scope.row.entryTime}}</span>
                      </template>
                    </el-table-column>
                    <el-table-column prop="pusher" label="推送人"></el-table-column>
                    <el-table-column v-if="radio =='简历未反馈' || radio =='简历已反馈'" width="160" label="推送时间">
                      <template slot-scope="scope">
                        <span>{{scope.row.pushTime | converTime("YYYY-MM-DD HH:mm")}}</span>
                      </template>
                    </el-table-column>
                    <el-table-column v-if="radio =='面试未反馈'" width="160" label="面试时间">
                      <template slot-scope="scope">
                        <span>{{scope.row.candidateTime | converTime("YYYY-MM-DD HH:mm")}}</span>
                      </template>
                    </el-table-column>
                    <el-table-column label="操作" v-if="radio =='简历未反馈' || radio =='简历已反馈'">
                      <template slot-scope="scope">
                        <span
                          style="cursor: pointer; color:#1198ff;"
                          v-if="scope.row.isoperate == '查看详情'"
                          @click="viewdetail1(scope.row)"
                        >{{scope.row.isoperate}}</span>
                        <span v-if="scope.row.isoperate == '暂无反馈'">{{scope.row.isoperate}}</span>
                      </template>
                    </el-table-column>
                    <el-table-column label="面试情况" v-if="radio =='面试未反馈'">
                      <template slot-scope="scope">
                        <span
                          style="cursor: pointer; color:#1198ff;"
                          v-if="scope.row.isoperate == '查看详情'"
                          @click="viewdetail(scope.row)"
                        >{{scope.row.isoperate}}</span>
                        <span v-if="scope.row.isoperate == '暂无反馈'">{{scope.row.isoperate}}</span>
                      </template>
                    </el-table-column>
                    <el-table-column label="未反馈原因" v-if="radio =='面试未反馈'">
                      <template slot-scope="scope">
                        <span
                          style="cursor: pointer; color:#1198ff;"
                          v-if="scope.row.nofeedbReasons == '查看详情'"
                          @click="viewdetail2(scope.row)"
                        >{{scope.row.nofeedbReasons}}</span>
                        <span v-if="scope.row.nofeedbReasons == '暂无反馈'">{{scope.row.nofeedbReasons}}</span>
                      </template>
                    </el-table-column>
                  </el-table>
                  <div class="pager">
                    <el-pagination
                      @size-change="handleSizeChange"
                      @current-change="pagehandleCurrentChange"
                      :current-page="currentPage"
                      :page-sizes="[5,10,15]"
                      :page-size="pagesize"
                      layout="total, sizes, prev, pager, next, jumper"
                      :total="totalcount"
                    ></el-pagination>
                  </div>
                </el-col>
              </el-row>
            </el-col>
          </el-col>
        </el-row>
      </div>
    </div>
    <!--            回复通过简历弹出框-->
    <el-dialog
      class="addP"
      title="反馈"
      :visible.sync="feedBackVisible"
      width="415px"
      :before-close="feedbackClose"
    >
      <el-form :model="formL" :rules="fdrules" ref="formL" label-position="top">
        <el-form-item prop="statusJf">
          <el-col>
            <span style="color:#333;font-weight:bold">
              <span style="color:#F56C6C;">*</span>简历情况
            </span>
          </el-col>
          <el-select placeholder="请选择简历情况" v-model.trim="formL.statusJf" @change="selstatus">
            <el-option v-for="(item,index) in options" :key="index" :label="item" :value="item"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item :label-width="formLabelWidth" prop="remarksJf">
          <el-col>
            <span style="color:#333;font-weight:bold">
              <span style="color:#F56C6C;">*</span>备注
            </span>
          </el-col>
          <el-input
            type="textarea"
            :autosize="{minRows:2}"
            v-model.trim="formL.remarksJf"
            placeholder="请输入简历反馈的原因"
          ></el-input>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button
          class="sure"
          :disabled="backdis"
          type="primary"
          round
          @click="backConfirm('formL')"
        >提交
        </el-button>
        <el-button class="cancel" round @click="feedbackClose()">取消</el-button>
      </div>
    </el-dialog>
    <!--             回复未反馈面试弹出框   -->
    <el-dialog
      class="addP"
      title="回复未反馈面试"
      :visible.sync="feedBackVisible1"
      width="415px"
      :before-close="nopassclose"
    >
      <el-form :model="unpassformL" :rules="unpassrule" ref="unpassformL" label-position="top">
        <el-form-item :label-width="formLabelWidth" prop="remarksMs">
          <el-col>
            <span style="color:#333;font-weight:bold">
              <span style="color:#F56C6C;">*</span>面试反馈
            </span>
          </el-col>
          <el-input
            type="textarea"
            :autosize="{minRows:2}"
            v-model.trim="unpassformL.remarksMs"
            placeholder="请输入面试反馈的原因"
          ></el-input>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button
          :disabled="unpassdis"
          class="sure"
          type="primary"
          round
          @click="unpassBack('unpassformL')"
        >提交
        </el-button>
        <el-button class="cancel" round @click="nopassclose()">取消</el-button>
      </div>
    </el-dialog>
    
    <!--            修改简历已反馈的弹出框-->
    <el-dialog
      class="addP"
      title="修改"
      :visible.sync="feedBackAlreadyVisible"
      width="415px"
      :before-close="feedBackAlreadyClose"
    >
      <el-form :model="formL" :rules="fdrules" ref="formL1" label-position="top">
        <el-form-item prop="statusJf">
          <el-col>
            <span style="color:#333;font-weight:bold">
              <span style="color:#F56C6C;">*</span>简历情况
            </span>
          </el-col>
          <el-select placeholder="请选择简历情况" v-model.trim="formL.statusJf" @change="selstatus">
            <el-option v-for="(item,index) in options" :key="index" :label="item" :value="item"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item :label-width="formLabelWidth" prop="remarksJf">
          <el-col>
            <span style="color:#333;font-weight:bold">
              <span style="color:#F56C6C;">*</span>备注
            </span>
          </el-col>
          <el-input
            type="textarea"
            :autosize="{minRows:2}"
            v-model.trim="formL.remarksJf"
            placeholder="请输入简历反馈的原因"
          ></el-input>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button
          class="sure"
          :disabled="backdis1"
          type="primary"
          round
          @click="backAlreadyConfirm('formL1')"
        >提交
        </el-button>
        <el-button class="cancel" round @click="feedbackClose()">取消</el-button>
      </div>
    </el-dialog>
    
    <!--            未选择表格当前行的弹出框-->
    <el-dialog
      title="错误"
      :visible.sync="editdialogVisible"
      width="30%"
      :before-close="handleOpen"
      class="deletedialog"
    >
      <div style="text-align: center">
        <i class="el-icon-warning" style="font-size: 20px;color: #fcb543;">
          <span style="font-size: 16px;color: #333;margin-left: 12px;">尚未选择任何面试反馈</span>
        </i>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button class="sure" round @click="handleOpen">确 定</el-button>
        <el-button round @click="handleOpen" class="cancel">取 消</el-button>
      </span>
    </el-dialog>
    
    <!--            未选择表格当前行的弹出框-->
    <el-dialog
      title="错误"
      :visible.sync="editdialogVisible1"
      width="30%"
      :before-close="handleOpen1"
      class="deletedialog"
    >
      <div style="text-align: center">
        <i class="el-icon-warning" style="font-size: 20px;color: #fcb543;">
          <span style="font-size: 16px;color: #333;margin-left: 12px;">尚未选择任何简历已反馈</span>
        </i>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button class="sure" round @click="handleOpen1">确 定</el-button>
        <el-button round @click="handleOpen1" class="cancel">取 消</el-button>
      </span>
    </el-dialog>
    
    <el-dialog
      title="错误"
      :visible.sync="errordialogVisible"
      width="30%"
      :before-close="handleClose"
      class="deletedialog"
    >
      <div style="text-align: center">
        <i class="el-icon-warning" style="font-size: 20px;color: #fcb543;">
          <span style="font-size: 16px;color: #333;margin-left: 12px;">选择日期超过当前日期</span>
        </i>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button class="sure" round @click="handleClose">确 定</el-button>
        <el-button round @click="handleClose" class="cancel">取 消</el-button>
      </span>
    </el-dialog>
    <!-- 简历反馈查看详情 -->
    <el-dialog
      title="查看详情"
      :visible.sync="detailVisible"
      width="415px"
      :before-close="detailClose"
      class="addroledialog back1"
    >
      <div style="text-align: left;width: 524px;margin-top: 20px;">
        <el-row>
          <el-col>
            <span style="color: #333;font-weight: 700;">简历情况 :</span>
            <span style="color:#fb8284;">{{statusJf}}</span>
          </el-col>
          <el-col style="margin: 20px 0 50px;">
            <span style="color: #333;font-weight: 700;">备注 :</span>
            <span style="color:#9b9b9b;">{{remarksJf}}</span>
          </el-col>
        </el-row>
      </div>
    </el-dialog>
    <!-- 面试未反馈查看详情 -->
    <el-dialog
      title="查看详情"
      :visible.sync="detailVisible1"
      width="415px"
      :before-close="detailClose1"
      class="addroledialog back1"
    >
      <div style="text-align: left;width: 524px;margin-top: 20px;">
        <el-row>
          <el-col style="margin: 10px 0 50px;">
            <span style="color: #333;font-weight: 700;">未反馈原因 :</span>
            <span style="color:#9b9b9b;">{{remarksMs}}</span>
          </el-col>
        </el-row>
      </div>
    </el-dialog>
    
    <div v-if="type == 3">
      <detail-work v-if="addShow" :detail-code="detailcode" ref="workdetail"></detail-work>
    </div>
    <div v-if="type == 4">
      <edit-work v-if="addShow" :currentData="currentrow" @getData="getData1" ref="editwork"></edit-work>
    </div>
  </div>
</template>

<script>
  import moment from "moment";
  import axios from "axios";
  import qs from "qs";
  import tagsView from "../../store/modules/tagsView";
  import EditWork from "./editwork.vue";
  import DetailWork from "./workdetail.vue";
  
  export default {
    components: {
      EditWork,
      DetailWork
    },
    name: "workjiaofu",
    data() {
      return {
        date: moment(new Date()).format("YYYY-MM-DD"),
        data: moment(new Date()).format("YYYY-MM-DD"),
        newcolor1: false,
        inputValue: "",
        radio: "简历未反馈",
        type: null,
        buttonshow: false,
        secondshow: false,
        addShow: false,
        feedBackVisible: false,
        feedBackVisible1: false,
        editdialogVisible: false,
        closedialogVisible: false,
        detailVisible: false,
        detailVisible1: false,
        formLabelWidth: "120px",
        feedBackAlreadyVisible: false,
        backdis1: false,
        editdialogVisible1: false,
        backdis: false,
        unpassdis: false,
        tableData: [],
        currentPage: 1,
        pagesize: 15,
        totalcount: 0,
        savedis: false,
        formL: {
          statusJf: "",
          remarksJf: ""
        },
        statusJf: "",
        remarksJf: "",
        remarksMs: "",
        unpassformL: {
          remarksMs: ""
        },
        form: {
          todaytask: "",
          id: ""
        },
        rules: {
          todaytask: [
            {required: true, message: "请输入今日工作", trigger: "blur"}
          ]
        },
        fdrules: {
          statusJf: [
            {required: true, message: "请选择反馈情况", trigger: "change"}
          ],
          remarksJf: [
            {required: true, message: "请输入反馈详情", trigger: "blur"}
          ]
        },
        unpassrule: {
          remarksMs: [
            {required: true, message: "请输入未反馈原因", trigger: "blur"}
          ]
        },
        options: ["通过", "不通过", "需求关闭", "暂未得到反馈"],
        errordialogVisible: false,
        inputdis: false,
        btndis: true,
        clock: true,
        taskinfo: "请输入今日工作..."
      };
    },
    created() {
      this.success();
      this.selecttodaywork();
    },
    methods: {
      //单选框变化
      radioChange(val) {
        this.currentPage = 1;
        if (this.radio == "简历未反馈") {
          this.inputValue = "";
          this.buttonshow = false;
          this.success();
        } else if (this.radio == "面试未反馈") {
          this.inputValue = "";
          if (this.date >= moment(new Date()).format("YYYY-MM-DD")) {
            this.buttonshow = true;
          } else {
            this.buttonshow = false;
          }
          
          this.tableData = [];
          axios
            .post(this.url + "/worktaskByjf/InterviewNoFeedBack", {
              time: this.date,
              condition: this.inputValue,
              pageNum: this.currentPage,
              pageSize: this.pagesize
            })
            .then(res => {
              this.unlogin(res.data.code);
              if (res.data.code == 200) {
                if (res.data.data !== null) {
                  this.tableData = res.data.data.list;
                  this.totalcount = res.data.data.total;
                }
              }
            });
        } else if (this.radio == "简历已反馈") {
          this.buttonshow = false;
            axios.post(this.url + '/worktaskByjf/ResumeFeedback', {
              time: this.date,
              condition: this.inputValue,
              pageNum: this.currentPage,
              pageSize: this.pagesize
            }).then(res => {
              this.unlogin(res.data.code)
              if(res.data.code == 200){
                this.tableData = res.data.data.list;
                this.totalcount = res.data.data.total;
              }
            })
        }
      },
      test(date) {
        $(".list")
          .find(".box1")
          .height(34);
        var date = moment(date).format("YYYY-MM-DD");
        axios
          .post(this.url + "/workrecord/checktime", {
            time: date
          })
          .then(res => {
            this.unlogin(res.data.code);
            if (res.data.code == 200) {
              this.date = date;
              this.getTable();
              this.selecttodaywork();
              if (this.date < moment(new Date()).format("YYYY-MM-DD")) {
                this.inputdis = true;
                this.btndis = false;
                this.clock = false;
                this.taskinfo = "暂无数据!";
                this.buttonshow = false;
              } else {
                this.inputdis = false;
                this.btndis = true;
                this.buttonshow = true;
                this.taskinfo = "请输入今日工作...";
                setTimeout(() => {
                  this.clock = true;
                }, 100);
              }
            }
            if (res.data.code == -300) {
              this.data = this.date;
              this.errordialogVisible = true;
              document.documentElement.style.overflow = "hidden";
            }
          });
      },
      tableshow(row) {
        this.addShow = false;
        this.secondshow = false;
        this.$refs.multipleTable.setCurrentRow(row);
        this.currentRow = null;
        this.type = null;
        this.getTable();
      },
      //获取表格数据
      getTable() {
        this.currentPage = 1;
        if (this.radio == "简历未反馈") {
          axios
            .post(this.url + "/worktaskByjf/ResumeNoFeedback", {
              time: this.date,
              condition: this.inputValue,
              pageNum: this.currentPage,
              pageSize: this.pagesize
            })
            .then(res => {
              this.unlogin(res.data.code);
              if (res.data.code == 200) {
                this.tableData = res.data.data.list;
                this.totalcount = res.data.data.total;
              }
            });
        } else if (this.radio == "面试未反馈") {
          axios
            .post(this.url + "/worktaskByjf/InterviewNoFeedBack", {
              time: this.date,
              condition: this.inputValue,
              pageNum: this.currentPage,
              pageSize: this.pagesize
            })
            .then(res => {
              this.unlogin(res.data.code);
              if (res.data.code == 200) {
                if (res.data.data !== null) {
                  this.tableData = res.data.data.list;
                  this.totalcount = res.data.data.total;
                }
              }
            });
        } else if (this.radio == '简历已反馈') {
          axios.post(this.url + '/worktaskByjf/ResumeFeedback', {
            time: this.date,
            condition: this.inputValue,
            pageNum: this.currentPage,
            pageSize: this.pagesize
          }).then(res => {
            this.unlogin(res.data.code)
            if(res.data.code == 200){
              this.tableData = res.data.data.list;
              this.totalcount = res.data.data.total;
            }
          })
        }
      },
      //获取表格数据
      getTable1() {
        if (this.radio == "简历未反馈") {
          axios
            .post(this.url + "/worktaskByjf/ResumeNoFeedback", {
              time: this.date,
              condition: this.inputValue,
              pageNum: this.currentPage,
              pageSize: this.pagesize
            })
            .then(res => {
              this.unlogin(res.data.code);
              if (res.data.code == 200) {
                this.tableData = res.data.data.list;
                this.totalcount = res.data.data.total;
              }
            });
        } else if (this.radio == "面试未反馈") {
          axios
            .post(this.url + "/worktaskByjf/InterviewNoFeedBack", {
              time: this.date,
              condition: this.inputValue,
              pageNum: this.currentPage,
              pageSize: this.pagesize
            })
            .then(res => {
              this.unlogin(res.data.code);
              if (res.data.code == 200) {
                if (res.data.data !== null) {
                  this.tableData = res.data.data.list;
                  this.totalcount = res.data.data.total;
                }
              }
            });
        } else if (this.radio == '简历已反馈') {
          axios.post(this.url + '/worktaskByjf/ResumeFeedback', {
            time: this.date,
            condition: this.inputValue,
            pageNum: this.currentPage,
            pageSize: this.pagesize
          }).then(res => {
            this.unlogin(res.data.code)
            if(res.data.code == 200){
              this.tableData = res.data.data.list;
              this.totalcount = res.data.data.total;
            }
          })
        }
      },
      //从后台获取简历未反馈表格的数据
      success() {
        axios
          .post(this.url + "/worktaskByjf/ResumeNoFeedback", {
            time: this.date,
            condition: this.inputValue,
            pageNum: this.currentPage,
            pageSize: this.pagesize
          })
          .then(res => {
            this.unlogin(res.data.code);
            if (res.data.code == 200) {
              if (res.data.data !== null) {
                this.tableData = res.data.data.list;
                this.totalcount = res.data.data.total;
              }
            }
          });
      },
      selecttodaywork() {
        axios
          .post(this.url + "/workrecord/selecttodaywork", {
            time: this.date
          })
          .then(res => {
            this.unlogin(res.data.code);
            if (res.data.code == 200) {
              this.form.todaytask = res.data.data.content;
              this.form.id = res.data.data.id;
            }
          });
      },
      //简历反馈按钮
      backClick() {
        if (this.currentRow == null) {
          this.editdialogVisible = true;
          document.documentElement.style.overflow = "hidden";
        } else {
          // this.formL.remarks_jf = "请输入";
          this.editdialogVisible = false;
          this.feedBackVisible = true;
          this.backdis = false;
          //  this.$nextTick(() => {
          //    this.$refs.formL.resetFields();
          //  })
          document.documentElement.style.overflow = "hidden";
          
          axios
            .post(this.url + "/worktaskByjf/selByNamejbFeed", {
              id: this.currentRow.id,
              name: this.currentRow.name,
              pusher: this.currentRow.pusher
            })
            .then(res => {
              this.unlogin(res.data.code);
              if (res.data.code == 200) {
                if (res.data.data !== null) {
                  this.formL.statusJf = res.data.data.workTaskByjfVo.statusJf;
                  this.formL.remarksJf = res.data.data.workTaskByjfVo.remarksJf;
                }
              }
            });
        }
      },
      //切换反馈按钮对应的内容
      selstatus() {
        if (this.formL.statusJf == "通过") {
          this.formL.remarksJf = "该简历已经通过";
        } else if (this.formL.statusJf == "不通过") {
          this.formL.remarksJf = "该简历不通过";
        } else if (this.formL.statusJf == "需求关闭") {
          this.formL.remarksJf = "该需求已关闭";
        } else if (this.formL.statusJf == "暂未得到反馈") {
          this.formL.remarksJf = "";
        }
      },
      feedbackClose(row) {
        this.feedBackVisible = false;
        this.$refs.multipleTable.setCurrentRow(row);
        this.currentRow = null;
        document.documentElement.style.overflow = "auto";
      },
      //交付对简历反馈的提交
      backConfirm(formName) {
        this.$refs[formName].validate(valid => {
          if (valid) {
            this.backdis = true;
            axios
              .post(this.url + "/worktaskByjf/fdBack", {
                id: this.currentRow.id,
                statusJf: this.formL.statusJf,
                remarksJf: this.formL.remarksJf
              })
              .then(res => {
                if (res.data.code == 200) {
                  this.backdis = false;
                  this.feedBackVisible = false;
                  this.getTable();
                  this.$refs.formL.resetFields();
                  document.documentElement.style.overflow = "auto";
                }
              });
          }
        });
      },
      //面试未反馈按钮
      unpassbackClick() {
        if (this.currentRow == null) {
          document.documentElement.style.overflow = "hidden";
          this.editdialogVisible = true;
        } else {
          document.documentElement.style.overflow = "hidden";
          this.editdialogVisible = false;
          this.feedBackVisible1 = true;
          //  this.$nextTick(() => {
          //    this.$refs.unpassformL.resetFields();
          //  })
          axios
            .post(this.url + "/worktaskByjf/selByNamejIFeed", {
              // name : row.name,
              id: this.currentRow.id
              // customerName : row.customerName,
            })
            .then(res => {
              this.unlogin(res.data.code);
              if (res.data.code == 200) {
                if (res.data.data !== null) {
                  this.unpassformL.remarksMs =
                    res.data.data.workTaskByjfVo.remarksMs;
                }
              }
            });
        }
      },
      nopassclose(row) {
        this.feedBackVisible1 = false;
        this.$refs.multipleTable.setCurrentRow(row);
        this.currentRow = null;
        document.documentElement.style.overflow = "auto";
      },
      //交付对面试未反馈原因的提交
      unpassBack(formName) {
        this.$refs[formName].validate(valid => {
          if (valid) {
            this.unpassdis = true;
            axios
              .post(this.url + "/worktaskByjf/nofdBack", {
                resume_upload_id: this.currentRow.id,
                remarksMs: this.unpassformL.remarksMs
              })
              .then(res => {
                if (res.data.code == 200) {
                  this.unpassdis = false;
                  this.feedBackVisible1 = false;
                  this.getTable();
                  this.$refs.unpassformL.resetFields();
                  document.documentElement.style.overflow = "auto";
                }
              });
          }
        });
      },
      //获取保存状态下的表格数据
      getData() {
        this.addShow = false;
        this.secondshow = false;
        this.currentRow = null;
        this.getTable();
      },
      getData1() {
        this.addShow = false;
        this.secondshow = false;
        this.currentRow = null;
        this.currentPage = 1;
        this.getTable();
      },
      //查看反馈内容
      viewdetail(val) {
        this.detailcode = val;
        this.addShow = !this.addShow;
        this.secondtitle = "查看反馈内容";
        this.secondshow = !this.secondshow;
        this.type = 3;
      },
      handleSizeChange(val) {
        this.pagesize = val;
        this.getTable1();
      },
      handleCurrentChange(val) {
        this.currentRow = val;
      },
      pagehandleCurrentChange(val) {
        this.currentPage = val;
        this.getTable1();
      },
      //搜索
      searchMsg() {
        this.currentPage = 1;
        this.getTable();
      },
      // 修改按钮点击
      editClick() {
        this.currentrow = null;
        if (this.currentRow == null) {
          document.documentElement.style.overflow = "hidden";
          //未选择表格行，展示的弹出框
          this.editdialogVisible = !this.editdialogVisible;
        } else {
          document.documentElement.style.overflow = "auto";
          this.addShow = !this.addShow;
          this.secondtitle = "修改反馈";
          this.secondshow = !this.secondshow;
          this.type = 4;
          this.currentrow = this.currentRow;
          //修改子组件的事件触发
          if (this.$refs.editinterview) {
            this.$refs.editinterview.clearData();
            this.$refs.editinterview.resetFields("form");
          }
        }
      },
      updatetodaywork(formName) {
        this.$refs[formName].validate(valid => {
          if (valid) {
            this.savedis = true;
            axios
              .post(this.url + "/workrecord/updatetodaywork", {
                content: this.form.todaytask,
                id: this.form.id
              })
              .then(res => {
                this.unlogin(res.data.code);
                if (res.data.code == 200) {
                  this.savedis = false;
                  this.$refs.form.resetFields();
                  this.selecttodaywork();
                }
              });
          }
        });
      },
      handleChange(val) {
        $(".list")
          .find(".box1")
          .height(34);
        var time = null;
        clearTimeout(time);
        time = setTimeout(() => {
          if (typeof val == "number") {
            $(".list")
              .eq(val)
              .find(".box1")
              .height(
                $(".list")
                  .eq(val)
                  .height()
              );
          } else {
            $(".list")
              .eq(val)
              .find(".box1")
              .height(34);
          }
        }, 300);
      },
      //简历反馈查看详情
      viewdetail1(row) {
        this.detailVisible = true;
        document.documentElement.style.overflow = "hidden";
        axios
          .post(this.url + "/worktaskByjf/selByNamejbFeed", {
            id: row.id,
            name: row.name,
            pusher: row.pusher
          })
          .then(res => {
            this.unlogin(res.data.code);
            if (res.data.code == 200) {
              if (res.data.data !== null) {
                this.statusJf = res.data.data.workTaskByjfVo.statusJf;
                this.remarksJf = res.data.data.workTaskByjfVo.remarksJf;
              }
            }
          });
      },
      detailClose() {
        this.detailVisible = false;
        document.documentElement.style.overflow = "auto";
      },
      //面试未反馈查看详情
      viewdetail2(row) {
        this.detailVisible1 = true;
        document.documentElement.style.overflow = "hidden";
        axios
          .post(this.url + "/worktaskByjf/selByNamejIFeed", {
            // name : row.name,
            id: row.id
            // customerName : row.customerName,
          })
          .then(res => {
            this.unlogin(res.data.code);
            if (res.data.code == 200) {
              if (res.data.data !== null) {
                this.remarksMs = res.data.data.workTaskByjfVo.remarksMs;
              }
            }
          });
      },
      detailClose1() {
        this.detailVisible1 = false;
        document.documentElement.style.overflow = "auto";
      },
      handleOpen() {
        this.editdialogVisible = false;
        document.documentElement.style.overflow = "auto";
      },
      handleClose() {
        this.errordialogVisible = false;
        document.documentElement.style.overflow = "auto";
      },
      //简历已反馈的修改按钮点击事件
      alreadybackClick() {
        if (this.currentRow == null) {
          document.documentElement.style.overflow = "hidden";
          //未选择表格行，展示的弹出框
          this.editdialogVisible1 = !this.editdialogVisible1;
        } else {
          this.backdis1 = false;
          this.feedBackAlreadyVisible = true;
          document.documentElement.style.overflow = "hidden";
          axios
            .post(this.url + "/worktaskByjf/selByNamejbFeed", {
              id: this.currentRow.id,
              name: this.currentRow.name,
              pusher: this.currentRow.pusher
            })
            .then(res => {
              this.unlogin(res.data.code);
              if (res.data.code == 200) {
                if (res.data.data !== null) {
                  this.formL.statusJf = res.data.data.workTaskByjfVo.statusJf;
                  this.formL.remarksJf = res.data.data.workTaskByjfVo.remarksJf;
                }
              }
            });
        }
      },
      //关闭修改简历已反馈的弹出框
      handleOpen1() {
        this.editdialogVisible1 = false;
        document.documentElement.style.overflow = "auto";
      },
      //提交修改的简历已反馈表单
      backAlreadyConfirm(formName) {
        this.$refs[formName].validate(valid => {
          if (valid) {
            this.backdis1 = true;
            axios
              .post(this.url + "/worktaskByjf/fdBack", {
                id: this.currentRow.id,
                statusJf: this.formL.statusJf,
                remarksJf: this.formL.remarksJf
              })
              .then(res => {
                if (res.data.code == 200) {
                  this.backdis1 = false;
                  this.feedBackAlreadyVisible = false;
                  this.getTable();
                  this.$refs.formL1.resetFields();
                  document.documentElement.style.overflow = "auto";
                }
              });
          }
        });
      },
      //关闭简历已反馈修改的表单
      feedBackAlreadyClose() {
        this.feedBackAlreadyVisible = false;
        document.documentElement.style.overflow = "auto";
      }
    }
    ,
    watch: {
      data: function (val) {
        this.test(moment(val).format("YYYY-MM-DD"));
      }
      ,
      inputValue: function (val) {
        if (val == "") {
          this.currentPage = 1;
          this.getTable();
        }
      }
    }
  }
  ;
</script>

<style scoped>
  .title {
    background-color: #fff;
    height: 40px;
    line-height: 40px;
    font-size: 14px;
    padding-left: 20px;
    margin-top: 6px;
    margin-bottom: 6px;
  }
  
  .posttable {
    min-height: 700px;
    background-color: #fff;
  }
  
  .workjiaofu {
    margin-left: 360px;
  }
  
  .msfk {
    /* width: 1440px; */
    margin-top: -770px;
  }
  
  .secondbox {
    height: 360px;
    margin-left: 24px;
    margin-right: 24px;
    border: 2px solid #ececec;
  }
  
  .thirdbox {
    height: 360px;
    border: 2px solid #ececec;
  }
  
  .textactive {
    color: #1099ff;
  }
  
  .thirdbox1 {
    margin-top: 10px;
    height: 360px;
    margin-bottom: 30px;
  }
  
  .pager {
    width: 100%;
    overflow: hidden;
    position: relative;
    margin-top: 10px;
    margin-bottom: 10px;
  }
  
  .el-pagination {
    margin-left: 50%;
    transform: translateX(-50%);
  }
  
  .edit {
    width: 65px;
    height: 28px;
    opacity: 0.86;
    color: #fff;
    background: linear-gradient(to bottom, #00cebf 0%, #009085 100%);
    padding: 7px 15px !important;
  }
  
  .active1 {
    background: linear-gradient(to bottom, #595dff 0%, #7073ff 100%);
  }
  
  .warn {
    width: 56px;
    height: 24px;
    line-height: 0;
  }
  
  .back {
    width: 65px;
    height: 28px;
    opacity: 0.86;
    color: #fff;
    background: linear-gradient(to bottom, #6a76c7 0%, #8995e8 100%);
    padding: 7px 15px !important;
  }
  
  .back:hover {
    color: #fff !important;
  }
  
  .back:focus {
    color: #fff !important;
  }
  
  .thirdicon {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: #4f76ff;
    text-align: center;
    line-height: 35px;
    color: #fff;
  }
  
  .save {
    margin-top: 13px;
    width: 150px;
    height: 40px;
    font-size: 16px;
    color: #fff;
    border-radius: 4px;
    margin-right: 43px;
    background: linear-gradient(to bottom, #5696f8 0%, #4e6ef5 100%);
  }
  
  @media screen and (min-width: 1600px) and (max-width: 1900px) {
    .secondbox {
      width: 30%;
    }
    
    .thirdbox {
      width: 40%;
      float: right;
    }
    
    .listbox {
      width: 77%;
      /* height: 100px; */
      margin: 0 auto;
    }
    
    .thirdbox1 {
      width: 40%;
      float: right;
    }
  }
  
  @media screen and (min-width: 1500px) and (max-width: 1600px) {
    .listbox {
      width: 75.3%;
      /* height: 100px; */
      margin: 0 auto;
    }
  }
  
  @media screen and (min-width: 1400px) and (max-width: 1500px) {
    .listbox {
      width: 73%;
      /* height: 100px; */
      margin: 0 auto;
    }
  }
  
  @media only screen and (max-width: 1400px) {
    .listbox {
      width: 68%;
      /* height: 100px; */
      margin: 0 auto;
    }
  }
  
  @media only screen and (min-width: 1920px) {
    .secondbox {
      width: 32.9%;
    }
    
    .listbox {
      width: 78%;
      /* height: 100px; */
      margin: 0 auto;
    }
    
    .thirdbox {
      width: 46.4%;
    }
    
    .thirdbox1 {
      width: 46.4%;
    }
  }
</style>









